package org.example.strategypatterndemo.module1.service.impl;

import org.example.strategypatterndemo.module1.service.PromotionStrategy;
import org.springframework.stereotype.Component;

/**
 * GiftStrategy
 * @author dingchen
 * @version 2025/05/29 12:35
**/
@Component
public class GiftStrategy implements PromotionStrategy {
    @Override
    public double calculateDiscount(double orderAmount) {
        if (orderAmount >= 100) {
            System.out.println("赠送赠品：小风扇");
        }
        return 0.0; // 无金额优惠
    }
}
